<%@ page import="com.xzw.JdbcUtils" %>
<%@ page import="java.io.PrintWriter" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/12/12
  Time: 11:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%
  String username = request.getParameter("u");
  String password = request.getParameter("p");
  String sql="SELECT id FROM `user` where username=? and `password`=MD5(?)";
  Integer id = JdbcUtils.select(sql, Integer.class, username, password);
  String message= id !=null && id > 0?"登陆成功！":"登陆失败！";

  PrintWriter writer = response.getWriter();
  writer.write(message);
  writer.flush();
  writer.close();
%>

